.\" -*- nroff -*-
.\" Copyright 1999 by David S. Miller.  All Rights Reserved.
.\" Portions Copyright 2001 Sun Microsystems
.\" This file may be copied under the terms of the GNU Public License.
.\" 
.\"	.An - list of n alternative values as in "flav vanilla|strawberry"
.\"
.de A1
\\fB\\$1\\fP|\\fB\\$2\\fP
..
.de A2
\\fB\\$1\\fP\ \\fB\\$2\\fP|\\fB\\$3\\fP
..
.de A3
\\fB\\$1\\fP\ \\fB\\$2\\fP|\\fB\\$3\\fP|\\fB\\$4\\fP
..
.de A4
\\fB\\$1\\fP\ \\fB\\$2\\fP|\\fB\\$3\\fP|\\fB\\$4\\fP|\\fB\\$5\\fP
..
.\" 
.\"	.Bn - same as above but framed by square brackets
.\"
.de B1
[\\fB\\$1\\fP|\\fB\\$2\\fP]
..
.de B2
[\\fB\\$1\\fP\ \\fB\\$2\\fP|\\fB\\$3\\fP]
..
.de B3
[\\fB\\$1\\fP\ \\fB\\$2\\fP|\\fB\\$3\\fP|\\fB\\$4\\fP]
..
.de B4
[\\fB\\$1\\fP\ \\fB\\$2\\fP|\\fB\\$3\\fP|\\fB\\$4\\fP|\\fB\\$5\\fP]
..
.\"
.\"	\(*MA - mac address
.\"
.ds MA \fIxx\fP\fB:\fP\fIyy\fP\fB:\fP\fIzz\fP\fB:\fP\fIaa\fP\fB:\fP\fIbb\fP\fB:\fP\fIcc\fP
.\"
.\"	\(*WO - wol flags
.\"
.ds WO \fBp\fP|\fBu\fP|\fBm\fP|\fBb\fP|\fBa\fP|\fBg\fP|\fBs\fP|\fBd\fP...
.\"
.\"	\(*FL - flow type values
.\"
.ds FL \fBtcp4\fP|\fBudp4\fP|\fBah4\fP|\fBsctp4\fP|\fBtcp6\fP|\fBudp6\fP|\fBah6\fP|\fBsctp6\fP
.\"
.\"	\(*HO - hash options
.\"
.ds HO \fBm\fP|\fBv\fP|\fBt\fP|\fBs\fP|\fBd\fP|\fBf\fP|\fBn\fP|\fBr\fP...
.TH ETHTOOL 8 "July 2007" "Ethtool version 6"
.SH NAME
ethtool \- Display or change ethernet card settings
.SH SYNOPSIS
.B ethtool
.I ethX

.B ethtool \-h|\-\-help

.B ethtool \-a|\-\-show\-pause
.I ethX

.B ethtool \-A|\-\-pause
.I ethX
.B2 autoneg on off
.B2 rx on off
.B2 tx on off

.B ethtool \-c|\-\-show\-coalesce
.I ethX

.B ethtool \-C|\-\-coalesce
.I ethX
.B2 adaptive-rx on off
.B2 adaptive-tx on off
.RB [ rx-usecs
.IR N ]
.RB [ rx-frames
.IR N ]
.RB [ rx-usecs-irq
.IR N ]
.RB [ rx-frames-irq
.IR N ]
.RB [ tx-usecs
.IR N ]
.RB [ tx-frames
.IR N ]
.RB [ tx-usecs-irq
.IR N ]
.RB [ tx-frames-irq
.IR N ]
.RB [ stats-block-usecs
.IR N ]
.RB [ pkt-rate-low
.IR N ]
.RB [ rx-usecs-low
.IR N ]
.RB [ rx-frames-low
.IR N ]
.RB [ tx-usecs-low
.IR N ]
.RB [ tx-frames-low
.IR N ]
.RB [ pkt-rate-high
.IR N ]
.RB [ rx-usecs-high
.IR N ]
.RB [ rx-frames-high
.IR N ]
.RB [ tx-usecs-high
.IR N ]
.RB [ tx-frames-high
.IR N ]
.RB [ sample-interval
.IR N ]

.B ethtool \-g|\-\-show\-ring
.I ethX

.B ethtool \-G|\-\-set\-ring
.I ethX
.RB [ rx
.IR N ]
.RB [ rx-mini
.IR N ]
.RB [ rx-jumbo
.IR N ]
.RB [ tx
.IR N ]

.B ethtool \-i|\-\-driver
.I ethX

.B ethtool \-d|\-\-register\-dump
.I ethX
.B2 raw on off
.B2 hex on off
.RB [ file 
.IR name ]

.B ethtool \-e|\-\-eeprom\-dump
.I ethX
.B2 raw on off
.RB [ offset
.IR N ]
.RB [ length
.IR N ]

.B ethtool \-E|\-\-change\-eeprom
.I ethX
.RB [ magic
.IR N ]
.RB [ offset
.IR N ]
.RB [ length
.IR N ]
.RB [ value
.IR N ]

.B ethtool \-k|\-\-show\-offload
.I ethX

.B ethtool \-K|\-\-offload
.I ethX
.B2 rx on off
.B2 tx on off
.B2 sg on off
.B2 tso on off
.B2 ufo on off
.B2 gso on off
.B2 gro on off
.B2 lro on off
.B2 rxvlan on off
.B2 txvlan on off
.B2 rxhash on off

.B ethtool \-p|\-\-identify
.I ethX
.RI [ N ]

.B ethtool \-P|\-\-show-permaddr
.I ethX

.B ethtool \-r|\-\-negotiate
.I ethX

.B ethtool \-S|\-\-statistics
.I ethX

.B ethtool \-t|\-\-test
.I ethX
.B1 offline online

.B ethtool \-s
.I ethX
.BI speed \ N
.B2 duplex half full
.B4 port tp aui bnc mii fibre
.B2 autoneg on off
.RB [ advertise
.IR N ]
.RB [ phyad
.IR N ]
.B2 xcvr internal external
.RB [ wol \ \*(WO]
.RB [ sopass \ \*(MA]
.RB [ msglvl
.IR N \ |
.BI msglvl \ type
.A1 on off
.RB ...]

.B ethtool \-n
.I ethX
.RB [ rx-flow-hash \ \*(FL]

.B ethtool \-N
.I ethX
.RB [ rx-flow-hash \ \*(FL
.RB \ \*(HO]

.B ethtool \-x|\-\-show\-rxfh\-indir
.I ethX

.B ethtool \-X|\-\-set\-rxfh\-indir
.I ethX
.RB [\  equal
.IR N \ |
.BI weight\  W0
.IR W1
.RB ...\ ]

.B ethtool \-f|\-\-flash
.I ethX
.RI FILE
.RI [ N ]

.B ethtool \-u|\-\-show\-ntuple
.I ethX

.TP
.BI ethtool\ \-U|\-\-config\-ntuple \ ethX
.RB {
.A3 flow-type tcp4 udp4 sctp4
.RB [ src-ip
.IR addr
.RB [ src-ip-mask
.IR mask ]]
.RB [ dst-ip
.IR addr
.RB [ dst-ip-mask
.IR mask ]]
.RB [ src-port
.IR port
.RB [ src-port-mask
.IR mask ]]
.RB [ dst-port
.IR port
.RB [ dst-port-mask
.IR mask ]]
.br
.RB | \ flow-type\ ether
.RB [ src
.IR mac-addr
.RB [ src-mask
.IR mask ]]
.RB [ dst
.IR mac-addr
.RB [ dst-mask
.IR mask ]]
.RB [ proto
.IR N
.RB [ proto-mask
.IR mask ]]\ }
.br
.RB [ vlan
.IR VLAN-tag
.RB [ vlan-mask
.IR mask ]]
.RB [ user-def
.IR data
.RB [ user-def-mask
.IR mask ]]
.RI action \ N

.SH DESCRIPTION
.BI ethtool
is used for querying settings of an ethernet device and changing them.

.I ethX
is the name of the ethernet device on which ethtool should operate.

.SH OPTIONS
.B ethtool
with a single argument specifying the device name prints current
settings of the specified device.
.TP
.B \-h \-\-help
Shows a short help message.
.TP
.B \-a \-\-show\-pause
Queries the specified ethernet device for pause parameter information.
.TP
.B \-A \-\-pause
Changes the pause parameters of the specified ethernet device.
.TP
.A2 autoneg on off
Specifies whether pause autonegotiation should be enabled.
.TP
.A2 rx on off
Specifies whether RX pause should be enabled.
.TP
.A2 tx on off
Specifies whether TX pause should be enabled.
.TP
.B \-c \-\-show\-coalesce
Queries the specified ethernet device for coalescing information.
.TP
.B \-C \-\-coalesce
Changes the coalescing settings of the specified ethernet device.
.TP
.B \-g \-\-show\-ring
Queries the specified ethernet device for rx/tx ring parameter information.
.TP
.B \-G \-\-set\-ring
Changes the rx/tx ring parameters of the specified ethernet device.
.TP
.BI rx \ N
Changes the number of ring entries for the Rx ring.
.TP
.BI rx-mini \ N
Changes the number of ring entries for the Rx Mini ring.
.TP
.BI rx-jumbo \ N
Changes the number of ring entries for the Rx Jumbo ring.
.TP
.BI tx \ N
Changes the number of ring entries for the Tx ring.
.TP
.B \-i \-\-driver
Queries the specified ethernet device for associated driver information.
.TP
.B \-d \-\-register\-dump
Retrieves and prints a register dump for the specified ethernet device.
The register format for some devices is known and decoded others
are printed in hex.
When 
.I raw 
is enabled, then ethtool dumps the raw register data to stdout.
If
.I file
is specified, then use contents of previous raw register dump, rather
than reading from the device.

.TP
.B \-e \-\-eeprom\-dump
Retrieves and prints an EEPROM dump for the specified ethernet device.
When raw is enabled, then it dumps the raw EEPROM data to stdout. The
length and offset parameters allow dumping certain portions of the EEPROM.
Default is to dump the entire EEPROM.
.TP
.B \-E \-\-change\-eeprom
If value is specified, changes EEPROM byte for the specified ethernet device.
offset and value specify which byte and it's new value. If value is not
specified, stdin is read and written to the EEPROM. The length and offset
parameters allow writing to certain portions of the EEPROM.
Because of the persistent nature of writing to the EEPROM, a device-specific
magic key must be specified to prevent the accidental writing to the EEPROM.
.TP
.B \-k \-\-show\-offload
Queries the specified ethernet device for offload information.
.TP
.B \-K \-\-offload
Changes the offload parameters of the specified ethernet device.
.TP
.A2 rx on off
Specifies whether RX checksumming should be enabled.
.TP
.A2 tx on off
Specifies whether TX checksumming should be enabled.
.TP
.A2 sg on off
Specifies whether scatter-gather should be enabled.
.TP
.A2 tso on off
Specifies whether TCP segmentation offload should be enabled.
.TP
.A2 ufo on off
Specifies whether UDP fragmentation offload should be enabled 
.TP
.A2 gso on off
Specifies whether generic segmentation offload should be enabled 
.TP
.A2 gro on off
Specifies whether generic receive offload should be enabled
.TP
.A2 lro on off
Specifies whether large receive offload should be enabled
.TP
.A2 rxvlan on off
Specifies whether RX VLAN acceleration should be enabled
.TP
.A2 txvlan on off
Specifies whether TX VLAN acceleration should be enabled
.TP
.A2 rxhash on off
Specifies whether receive hashing offload should be enabled
.TP
.B \-p \-\-identify
Initiates adapter-specific action intended to enable an operator to
easily identify the adapter by sight.  Typically this involves
blinking one or more LEDs on the specific ethernet port.
.TP
.B N
Length of time to perform phys-id, in seconds.
.TP
.B \-P \-\-show-permaddr
Queries the specified ethernet device for permanent hardware address.
.TP
.B \-r \-\-negotiate
Restarts auto-negotiation on the specified ethernet device, if
auto-negotiation is enabled.
.TP
.B \-S \-\-statistics
Queries the specified ethernet device for NIC- and driver-specific
statistics.
.TP
.B \-t \-\-test
Executes adapter selftest on the specified ethernet device. Possible test modes are:
.TP
.A1 offline online
defines test type: 
.B offline
(default) means to perform full set of tests possibly causing normal operation interruption during the tests,
.B online
means to perform limited set of tests do not interrupting normal adapter operation.
.TP
.B \-s \-\-change
Allows changing some or all settings of the specified ethernet device.
All following options only apply if
.B \-s
was specified.
.TP
.BI speed \ N
Set speed in Mb/s.
.B ethtool
with just the device name as an argument will show you the supported device speeds.
.TP
.A2 duplex half full
Sets full or half duplex mode.
.TP
.A4 port tp aui bnc mii fibre
Selects device port.
.TP
.A2 autoneg on off
Specifies whether autonegotiation should be enabled. Autonegotiation 
is enabled by deafult, but in some network devices may have trouble
with it, so you can disable it if really necessary. 
.TP
.BI advertise \ N
Sets the speed and duplex advertised by autonegotiation.  The argument is
a hexidecimal value using one or a combination of the following values:
.RS
.PD 0
.TP 3
.BR "0x001" "    10 Half"
.TP 3
.BR "0x002" "    10 Full"
.TP 3
.BR "0x004" "    100 Half"
.TP 3
.BR "0x008" "    100 Full"
.TP 3
.BR "0x010" "    1000 Half" "(not supported by IEEE standards)"
.TP 3
.BR "0x020" "    1000 Full"
.TP 3
.BR "0x8000" "   2500 Full" "(not supported by IEEE standards)"
.TP 3
.BR "0x1000" "   10000 Full"
.TP 3
.BR "0x03F" "    Auto"
.PD
.RE
.TP
.BI phyad \ N
PHY address.
.TP
.A2 xcvr internal external
Selects transceiver type. Currently only internal and external can be
specified, in the future further types might be added.
.TP
.BR wol \ \*(WO
Sets Wake-on-LAN options.  Not all devices support this.  The argument to 
this option is a string of characters specifying which options to enable.
.RS
.PD 0
.TP 3
.B p
Wake on phy activity
.TP 3
.B u
Wake on unicast messages
.TP 3
.B m
Wake on multicast messages
.TP 3
.B b
Wake on broadcast messages
.TP 3
.B a
Wake on ARP
.TP 3
.B g
Wake on MagicPacket(tm)
.TP 3
.B s
Enable SecureOn(tm) password for MagicPacket(tm)
.TP 3
.B d
Disable (wake on nothing).  This option clears all previous options.
.PD
.RE
.TP
.B sopass \*(MA\c
Sets the SecureOn(tm) password.  The argument to this option must be 6
bytes in ethernet MAC hex format (\*(MA).
.PP
.BI msglvl \ N
.br
.BI msglvl \ type
.A1 on off
.RB ...
.RS
Sets the driver message type flags by name or number. \fItype\fR
names the type of message to enable or disable; \fIN\fR specifies the
new flags numerically. The defined type names and numbers are:
.PD 0
.TP 12
.B drv
0x0001  General driver status
.TP 12
.B probe
0x0002  Hardware probing
.TP 12
.B link
0x0004  Link state
.TP 12
.B timer
0x0008  Periodic status check
.TP 12
.B ifdown
0x0010  Interface being brought down
.TP 12
.B ifup
0x0020  Interface being brought up
.TP 12
.B rx_err
0x0040  Receive error
.TP 12
.B tx_err
0x0080  Transmit error
.TP 12
.B tx_queued
0x0100  Transmit queueing
.TP 12
.B intr
0x0200  Interrupt handling
.TP 12
.B tx_done
0x0400  Transmit completion
.TP 12
.B rx_status
0x0800  Receive completion
.TP 12
.B pktdata
0x1000  Packet contents
.TP 12
.B hw
0x2000  Hardware status
.TP 12
.B wol
0x4000  Wake-on-LAN status
.PP
The precise meanings of these type flags differ between drivers.
.PD
.RE
.TP
.B \-n \-\-show-nfc
Retrieves the receive network flow classification configurations.
.TP
.BR rx-flow-hash \ \*(FL
Retrieves the hash options for the specified network traffic type.
.RS
.PD 0
.TP 3
.BR "tcp4" "    TCP over IPv4"
.TP 3
.BR "udp4" "    UDP over IPv4"
.TP 3
.BR "ah4" "     IPSEC AH/ESP over IPv4"
.TP 3
.BR "sctp4" "   SCTP over IPv4"
.TP 3
.BR "tcp6" "    TCP over IPv6"
.TP 3
.BR "udp6" "    UDP over IPv6"
.TP 3
.BR "ah6" "     IPSEC AH/ESP over IPv6"
.TP 3
.BR "sctp6" "   SCTP over IPv6"
.PD
.RE
.TP
.B \-N \-\-config-nfc
Configures the receive network flow classification.
.TP
.BR rx-flow-hash \ \*(FL \ \*(HO
Configures the hash options for the specified network traffic type.
.RS
.PD 0
.TP 3
.B m
Hash on the Layer 2 destination address of the rx packet.
.TP 3
.B v
Hash on the VLAN tag of the rx packet.
.TP 3
.B t
Hash on the Layer 3 protocol field of the rx packet.
.TP 3
.B s
Hash on the IP source address of the rx packet.
.TP 3
.B d
Hash on the IP destination address of the rx packet.
.TP 3
.B f
Hash on bytes 0 and 1 of the Layer 4 header of the rx packet.
.TP 3
.B n
Hash on bytes 2 and 3 of the Layer 4 header of the rx packet.
.TP 3
.B r
Discard all packets of this flow type. When this option is set, all other options are ignored.
.PD
.RE
.TP
.B \-x \-\-show\-rxfh\-indir
Retrieves the receive flow hash indirection table.
.TP
.B \-X \-\-set\-rxfh\-indir
Configures the receive flow hash indirection table.
.TP
.BI equal\  N
Sets the receive flow hash indirection table to spread flows evenly
between the first \fIN\fR receive queues.
.TP
\fBweight\fR \fIW0 W1\fR ...
Sets the receive flow hash indirection table to spread flows between
receive queues according to the given weights.  The sum of the weights
must be non-zero and must not exceed the size of the indirection table.
.TP
.B \-f \-\-flash \ FILE
Flash firmware image from the specified file to a region on the adapter.
By default this will flash all the regions on the adapter.
.TP
.B N
A number to identify flash region where the image should be flashed.
Default region is 0 which denotes all regions in the flash.
.PD
.RE
.TP
.B \-u \-\-show-ntuple
Get Rx ntuple filters and actions, then display them to the user.
.PD
.RE
.TP
.B \-U \-\-config-ntuple
Configure Rx ntuple filters and actions
.TP
.B flow-type tcp4|udp4|sctp4|ether
.RS
.PD 0
.TP 3
.BR "tcp4" "    TCP over IPv4"
.TP 3
.BR "udp4" "    UDP over IPv4"
.TP 3
.BR "sctp4" "   SCTP over IPv4"
.TP 3
.BR "ether" "   Ethernet"
.PD
.RE
.TP
.BI src-ip \ addr
Includes the source IP address, specified using dotted-quad notation
or as a single 32-bit number.
.TP
.BI src-ip-mask \ mask
Specify a mask for the source IP address.
.TP
.BI dst-ip \ addr
Includes the destination IP address.
.TP
.BI dst-ip-mask \ mask
Specify a mask for the destination IP address.
.TP
.BI src-port \ port
Includes the source port.
.TP
.BI src-port-mask \ mask
Specify a mask for the source port.
.TP
.BI dst-port \ port
Includes the destination port.
.TP
.BI dst-port-mask \ mask
Specify a mask for the destination port.
.TP
.BI src \ mac-addr
Includes the source MAC address, specified as 6 bytes in hexadecimal
separated by colons.
.TP
.BI src-mask \ mask
Specify a mask for the source MAC address.
.TP
.BI dst \ mac-addr
Includes the destination MAC address.
.TP
.BI dst-mask \ mask
Specify a mask for the destination MAC address.
.TP
.BI proto \ N
Includes the Ethernet protocol number (ethertype).
.TP
.BI proto-mask \ mask
Specify a mask for the Ethernet protocol number.
.TP
.BI vlan \ VLAN-tag
Includes the VLAN tag.
.TP
.BI vlan-mask \ mask
Specify a mask for the VLAN tag.
.TP
.BI user-def \ data
Includes 64-bits of user-specific data.
.TP
.BI user-def-mask \ mask
Specify a mask for the user-specific data.
.TP
.BI action \ N
Specifies the Rx queue to send packets to, or some other action.
.RS
.PD 0
.TP 3
.BR "-2" "             Clear the filter"
.TP 3
.BR "-1" "             Drop the matched flow"
.TP 3
.BR "0 or higher" "    Rx queue to route the flow"
.PD
.RE
.SH BUGS
Not supported (in part or whole) on all ethernet drivers.
.SH AUTHOR
.B ethtool
was written by David Miller.

Modifications by 
Jeff Garzik, 
Tim Hockin,
Jakub Jelinek,
Andre Majorel,
Eli Kupermann,
Scott Feldman,
Andi Kleen.
.SH AVAILABILITY
.B ethtool
is available over the Web on the SourceForge site at
http://sourceforge.net/projects/gkernel/

